package cn.tom.system.controller;


import cn.tom.basic.util.AjaxResult;
import cn.tom.system.pojo.dto.LoginDto;
import cn.tom.system.service.LogininfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 接口类：登录
 */
@RestController
@RequestMapping("/login")
public class LoginController {

    @Autowired
    private LogininfoService logininfoService;

    /**
     * 接口：账号登录
     * @param loginDto
     * @return
     */
    @PostMapping("/account")
    public AjaxResult accountLogin(@RequestBody LoginDto loginDto){
        return logininfoService.accountLogin(loginDto);
    }
    /*
    *//**
     * 微信登录
     * @param loginDto
     * @return
     *//*
    @PostMapping("/wechat")
    public AjaxResult wechatLogin(@RequestBody LoginDto loginDto){
        return logininfoService.wechatLogin(loginDto);
    }

    *//**
     * 微信绑定
     * @param map
     * @return
     *//*
    @PostMapping("/wechat/binder")
    public AjaxResult wechatBinder(@RequestBody Map<String,String> map){
        return logininfoService.wechatBinder(map);
    }
*/
}
